package com.wanho.java156.util;

import org.apache.commons.lang3.RandomUtils;
import org.springframework.stereotype.Component;

@Component
public class CodeUtil {
    /**
     * 生成 6 位 随机 短信验证码
     * @return
     */
    public String randCode(){
        return String.valueOf(RandomUtils.nextInt(1000,10000)) ;
    }
}
